
namespace SimpleCore
{
    public interface IFsm
    {
        /// <summary>
        /// 切换
        /// </summary>
        /// <param name="arg"></param>
        /// <typeparam name="T"></typeparam>
        void ChangeNode<T>(object arg = null) where T : FsmNode;

        /// <summary>
        /// 外部按需求调用。Update
        /// </summary>
        /// <param name="interval"></param>
        void Update(float interval);

        /// <summary>
        /// 添加节点
        /// </summary>
        /// <typeparam name="T"></typeparam>
        void AddNode<T>() where T : FsmNode, new();

        /// <summary>
        /// 当前节点
        /// </summary>
        FsmNode CurrentNode { get; }
    }
}